package com.biz.primus.ms.commodity.dao.repository.product;

import com.biz.primus.ms.base.jpa.repository.CommonJpaRepository;
import com.biz.primus.ms.commodity.dao.po.GroupProduct;
import org.springframework.data.jpa.repository.Query;

/**
 * 组合商品Repository
 * @author zhangcheng
 * @date 2017/3/13
 * @reviewer
 * @see
 */
public interface GroupProductRepository extends CommonJpaRepository<GroupProduct, Long>, GeoProductDao{

    @Query("FROM GroupProduct g WHERE g.product.id = ?1")
    GroupProduct findByProductId(Long productId);

    GroupProduct findByProductProductCode(String productCode);

}
